// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 GET /task/calendar-records */
export async function getUserCalendarRecords(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserCalendarRecordsParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject>('/task/calendar-records', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /task/points-record */
export async function getUserPointsRecord(options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/task/points-record', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /task/sign-in */
export async function signIn(options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/task/sign-in', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /task/subscribe */
export async function subscribeTask(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.subscribeTaskParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject>('/task/subscribe', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /task/video-watch */
export async function awardVideoWatchPoints(
  body: API.VideoWatchRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject>('/task/video-watch', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
